﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI.TraCuu_Update
{
    public partial class KhachHangFrm : Form
    {
        UserControl _khachhang;

        public KhachHangFrm(Action<DTO.KhachHangDTO> callback)
        {
            InitializeComponent();
            _khachhang = new GUI.TraCuu_Update.KhachHangGUI(false,callback);
        }

        private void KhachHangFrm_Load(object sender, EventArgs e)
        {
            pnl_Main.Controls.Clear();
            pnl_Main.Controls.Add(_khachhang);
        }

        public void SetCallback(Action<DTO.KhachHangDTO> callback)
        {
            (_khachhang as GUI.TraCuu_Update.KhachHangGUI).SetCallback(callback);
        }
    }
}
